require(['jquery', 'cookie', 'app', 'lay', 'base64'], function ($) {
    require(['vue'], function (Vue) {
        var dic = new Vue({
            el: ".vue-box"
            , data: {
                that: []
            }
            , created: function () {
                this.that = playAjax("/SwiperController/PayList").data
            }
            , methods: {
                referXadmin: function () {
                    window.reload();
                }
            }
        });

        layui.use('upload', function () {
            var upload = layui.upload;
            //执行实例
            for (var i = 0; i < dic.that.length; i++) {
                (function (j) {
                    var uid="#" + dic.that[j]['uuid'];
                    upload.render({
                        elem: "#" + dic.that[j]['uuid'] //绑定元素
                        , url: "/"+configPro.projectName+"/ImgController/upload?project="+dic.that[j].keyst //上传接口
                        , done: function (res) {
                            debugger
                            $(uid).parent().parent().prev().prev().find("a").attr("href",res.data.src);
                            $(uid).parent().parent().prev().prev().find("a").text(res.data.src);
                            alr(res.msg);
                        }
                        , error: function (res) {
                            alr("上传失败");
                        }
                    });
                })(i)
            }
        });

    });
});
function editDBL(e) {
    $(e).html("<input class='layui-input' type='number' onblur='editBlur(this)'/>");
}